﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Didsoft.Mvc.Security;
using RBDD.Embol.AccesoDatos.Contexto;
using RBDD.Embol.AccesoDatos.Contratos;
using RBDD.Embol.AccesoDatos.Entidades;

namespace RBDD.Embol.Negocios
{
    public class GlobalSession : ISessionContext<object>
    {
        #region session actions

        public void InitializeSession(object UserInfo, string sessionKey)
        {

        }

        public void PersistSessionAction(object UserInfo, string sessionKey)
        {
            var s = UserInfo;
        }

        public void DeleteSession(object UserInfo, string sessionKey)
        {
            var s = UserInfo;
        }

        public void CleanTempData(object UserInfo, string sessionKey)
        {
            var s = UserInfo;
        }

        public void PersistSessionAction(string action, string parameters)
        {
            var s = action;
        }

        public void PersistSessionAction(object userinfo, string SessionKey, string controller, string action, string parameters)
        {

        }
        #endregion


        public bool IsAuthorizedAction(string controller, string action)
        {
            return true;
        }

        public static Usuario UserInfo()
        {
            return SessionContext<Usuario>.UserInfo;
        }


    }
}
